package com.blazer.b;

public class arraykr {
    public static void main(String[] args) {
        int[] oldArr={1,2,3,4,5};
        int[] newArr=new int[10];
        for (int i=0;i<oldArr.length;i++){
            newArr[i]=oldArr[i];
        }
        //新数组的地址给老数组
        oldArr=newArr;
        for (int i=0;i<oldArr.length;i++){
            System.out.println(oldArr[i]);
        }
    }
}
